<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%
	String path = request.getScheme() + "://" + request.getServerName()
			+ ":" + request.getServerPort();
	String basePath = path + request.getContextPath();
	request.setAttribute("basePath", basePath);
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>首页</title>
<link rel="stylesheet" href="${basePath}/assets/css/bootstrap.min.css">
<link rel="stylesheet"
	href="${basePath}/assets/css/bootstrap-theme.min.css">
<script src="http://cdn.bootcss.com/jquery/1.11.2/jquery.min.js"></script>
<script src="${basePath}/assets/js/bootstrap.min.js"></script>
<script type="text/javascript">
	function showForm(tableName){
		$("#form-box").load("${basePath}/loadForm.do?tableName="+tableName);
	}
</script>
</head>
<body>
	<div class="col-md-12">
		<table class="table table-bordered table-hover">
			<caption>
				<th>表名称</th>
				<th>查看表单</th>
			</caption>
			<c:forEach items="${tables }" var="tbl">
				<tr>
					<td>${tbl.tableName }</td>
					<td><button type="button" onclick="javascript:showForm('${tbl.tableName}');">查看表单</button></td>
				</tr>
			</c:forEach>
		</table>
	</div>
	<div id="form-box"></div>
</body>
</html>